{include file="public/head"}

<body>
<div id="wrapper">
    {include file="public/menu"}

    <div id="page-wrapper" class="gray-bg dashbard-1">
        {include file="public/nav"}
        <div class="row wrapper border-bottom white-bg page-heading">
            <div class="col-lg-10">
                <h2>财务信息</h2>
                <ol class="breadcrumb">
                    <li>
                        <a href="{:url('Index/index')}">主页</a>
                    </li>
                    <li>
                        <a>财务</a>
                    </li>
                    <li>
                        <strong>财务明细</strong>
                    </li>
                </ol>
            </div>
            <div class="col-lg-2">

            </div>
        </div>
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>财务明细列表</h5>
                            <div class="ibox-tools">
                                <small>共 {$Count} 条</small>
                            </div>
                        </div>

                        <div class="ibox-content">
                            <form method="get" action="{:url('Finance/FinanceList')}">
                                <div class="row">
                                    <div class="col-sm-4 m-b-xs">
                                        <div class="row">
                                            <div class="col-sm-2 m-b-xs"></div>
                                            <div class="col-sm-3 m-b-xs">奖金类型</div>
                                            <div class="col-sm-7 m-b-xs">
                                                <select class="input-sm form-control input-s-sm inline" id="reward_type" name="reward_type">
                                                    <option value="0">全部</option>
                                                    <option value="1" {if condition="$Data.reward_type eq 1"}selected{/if}>后台增加</option>
                                                    <option value="2" {if condition="$Data.reward_type eq 2"}selected{/if}>后台扣除</option>
                                                    <!--<option value="3" {if condition="$Data.reward_type eq 3"}selected{/if}>推荐奖励</option>-->
                                                    <!--<option value="4" {if condition="$Data.reward_type eq 4"}selected{/if}>业绩奖励</option>-->
                                                    <!--<option value="5" {if condition="$Data.reward_type eq 5"}selected{/if}>同级奖励</option>-->
                                                    <option value="6" {if condition="$Data.reward_type eq 6"}selected{/if}>会员充值</option>
                                                    <option value="7" {if condition="$Data.reward_type eq 7"}selected{/if}>转账转出</option>
                                                    <option value="8" {if condition="$Data.reward_type eq 8"}selected{/if}>转账转进</option>
                                                    <option value="9" {if condition="$Data.reward_type eq 9"}selected{/if}>申请提现</option>
                                                    <option value="10" {if condition="$Data.reward_type eq 10"}selected{/if}>提现驳回</option>
                                                    <!--<option value="11" {if condition="$Data.reward_type eq 11"}selected{/if}>每日利息</option>-->
                                                    <option value="12" {if condition="$Data.reward_type eq 12"}selected{/if}>资金转换</option>
                                                    <!--<option value="11" {if condition="$Data.reward_type eq 11"}selected{/if}>推荐奖</option>-->
                                                    <!--<option value="15" {if condition="$Data.reward_type eq 15"}selected{/if}>管理津贴奖励</option>-->
                                                    <!--<option value="16" {if condition="$Data.reward_type eq 16"}selected{/if}>复购奖励</option>-->
                                                    <!--<option value="17" {if condition="$Data.reward_type eq 17"}selected{/if}>平级奖</option>-->
                                                </select>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="col-sm-4 m-b-xs">
                                        <div class="row">
                                            <div class="col-sm-2 m-b-xs"></div>
                                            <div class="col-sm-3 m-b-xs">会员账号</div>
                                            <div class="col-sm-7 m-b-xs">
                                                <input type="text" class="input-sm form-control input-s-sm inline" id="username" name="username" value="{$Data.username|default=''}">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-4 m-b-xs">
                                        <div class="row">
                                            <div class="col-sm-2 m-b-xs"></div>
                                            <div class="col-sm-3 m-b-xs">来源账号</div>
                                            <div class="col-sm-7 m-b-xs">
                                                <input type="text" class="input-sm form-control input-s-sm inline" id="from" name="from" value="{$Data.from|default=''}">
                                            </div>
                                        </div>
                                    </div>



                                </div>
                                <div class="row">
                                    <div class="col-sm-4 m-b-xs">
                                        <div class="row">
                                            <div class="col-sm-2 m-b-xs"></div>
                                            <div class="col-sm-3 m-b-xs">订单号</div>
                                            <div class="col-sm-7 m-b-xs">
                                                <input type="text" class="input-sm form-control input-s-sm inline" id="order_id" name="order_id" value="{$Data.order_id|default=''}">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-4 m-b-xs">
                                        <div class="row">
                                            <div class="col-sm-2 m-b-xs"></div>
                                            <div class="col-sm-3 m-b-xs">开始时间</div>
                                            <div class="col-sm-7 m-b-xs">
                                                <input type="datetime-local" class="input-sm form-control input-s-sm inline" id="begin_time" name="begin_time" value="{$Data.begin_time|default=''}">
                                            </div>
                                        </div>
                                    </div>

                                    <div class="col-sm-4 m-b-xs">
                                        <div class="row">
                                            <div class="col-sm-2 m-b-xs"></div>
                                            <div class="col-sm-3 m-b-xs">结束时间</div>
                                            <div class="col-sm-7 m-b-xs">
                                                <input type="datetime-local" class="input-sm form-control input-s-sm inline" id="end_time" name="end_time" value="{$Data.end_time|default=''}">
                                            </div>
                                        </div>
                                    </div>

                                    <div class="col-sm-4 m-b-xs">
                                        <div class="row">
                                            <div class="col-sm-6 m-b-xs"></div>
                                            <div class="col-sm-6 m-b-xs">
                                                <button class="btn btn-sm btn-primary" type="submit" id="search"><i class="fa fa-search"></i> 搜索</button>
                                                <button class="btn btn-sm btn-success" type="submit" id="export">导出Excel</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </form>
                            <div class="table-responsive">
                                <table class="table table-hover">
                                    <thead>
                                    <tr>
                                        <th>#</th>
                                        <th>会员账号</th>
                                        <th>来源id</th>
                                        <th>来源账号</th>
                                        <th>来源级别</th>
                                        <th>操作数量</th>
                                        <th>操作类型</th>
                                        <th>备注信息</th>
                                        <th>记录时间</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {volist name="FinanceList" id="v"}
                                    <tr>
                                        <td>{$key+1}</td>
                                        <td>{$v.user_name}</td>
                                        <td>{$v.from_id}</td>
                                        <td>{$v.from_name}</td>
                                        <td>{$v.from_level}</td>
                                        <td>{$v.num}</td>
                                        <td>
                                            {if condition="$v.type eq 1"}积分
                                            {elseif condition="$v.type eq 2"}积分+余额
                                            {elseif condition="$v.type eq 3"}余额
                                            {elseif condition="$v.type eq 4"}余额
                                            {elseif condition="$v.type eq 9"}微信支付
                                            {/if}
                                        </td>
                                        <td>{$v.remarks}</td>
                                        <td>{$v.add_time|date="Y-m-d H:i:s",###}</td>
                                    </tr>
                                    {/volist}
                                    </tbody>
                                </table>
                            </div>
                            <div class="row" style="text-align: center">
                                {$Page}
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        {include file="public/foot"}

    </div>
</div>
</div>
{include file="public/footer"}
<script>
    /*条件搜索*/
    var searchurl = "{:url('Finance/FinanceList')}";
    $('#search').click(function () {

        $('form').attr('action',searchurl);
    });

    /*Excel导出*/
    var exporturl = "{:url('Finance/FinanceExport')}";
    $('#export').click(function () {

        $('form').attr('action',exporturl);
    });
</script>
</body>
</html>
